package com.mlh.exception;

import com.mlh.enums.AppHttpCodeEnum;

/**
 * @author 缪林辉
 * @date 2024/3/15 17:08
 * @DESCRIPTION
 */
public class SystemException extends RuntimeException{
    //错误码
    private int code;
    //错误信息
    private String msg;
    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public SystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }
}
